﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using TicketingCompany.Models;

namespace TicketingCompany.Controllers
{
    public class OffersController : Controller
    {
        private TicketingCompanyEntities dbContext = new TicketingCompanyEntities();

        public ActionResult All()
        {
            return View(dbContext.Events);
        }

        public ActionResult ByCategory(int CategoryID)
        {
            return View("All",dbContext.Events.Where(e=> e.CategoryID==CategoryID));
        }
    }
}
